{include file="public/header" /}
<style>
    .layui-form-label{
        padding: 9px 0;
        width: auto;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>审核</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <input type="hidden" name="id" value="{$info['user_id']}">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">身份证正面：</label>
                            <div class="input-group col-sm-5">
                                <img height="100px"
                                     style="float:left;margin-left: 50px;margin-top: 20px;cursor:pointer;border-radius: 0"
                                     src="{$info.user_h_zheng}"
                                     onerror="this.src='/static/admin/images/head_default.gif'"  class="img-circle" />
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">身份证反面：</label>
                            <div class="input-group col-sm-5">
                                <img height="100px"
                                     style="float:left;margin-left: 50px;margin-top: 20px;cursor:pointer;border-radius: 0"
                                     src="{$info.user_h_fan}"
                                     onerror="this.src='/static/admin/images/head_default.gif'" class="img-circle" />
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">用户昵称：</label>
                            <div class="layui-input-block">
                                <input type="text"   class="layui-input" value="{$info.user_username}" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">手机号：</label>
                            <div class="layui-input-block">
                                <input type="text"   class="layui-input" value="{$info.user_phone}" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">姓名：</label>
                            <div class="layui-input-block">
                                <input type="text"  class="layui-input" value="{$info.user_h_name}" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">身份证号：</label>
                            <div class="layui-input-block">
                                <input type="text"   class="layui-input" value="{$info.user_h_idcard}" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">提交时间：</label>
                            <div class="layui-input-block">
                                <input type="text"   class="layui-input" value="{$info.user_h_time}" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">审核状态</label>
                            <div class="layui-input-block">
                                <input type="radio" name="s_status" checked value="2" title="通过" lay-filter="s_status">
                                <input type="radio" name="s_status" value="1" title="拒绝" lay-filter="s_status">
                            </div>
                        </div>
                        <div class="s_reason layui-form-item layui-col-md-offset1 layui-col-md8" style="display:none">
                            <label class="layui-form-label">拒绝原因：</label>
                            <textarea name="s_reason" style="width:580px;height:200px"></textarea>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">审核
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('examine')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        wk.success(res.msg,"{:url('Userh/index')}")
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
        form.on('radio(s_status)', function(data){
            if(data.value == 2){
                $(".s_reason").hide();
            }else{
                $(".s_reason").show();
            }
        });
    });
</script>
</body>
</html>
